﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using tms.Menus.Dto;
using Microsoft.AspNetCore.Mvc;
using tms.Admins.Dto;
using tms.Filters;

namespace tms.Menus
{
    [ApiExplorerSettings(GroupName = "v1")]
    [CustomerAuth]
    public class MenuService : CrudAppService<Menu, MenuDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateMenuDto>, IMenuService
    {
        private readonly IRepository<Menu, Guid> repository;

        public MenuService(IRepository<Menu, Guid> repository) : base(repository)
        {
            this.repository = repository;
        }

        public override Task<MenuDto> CreateAsync(CreateUpdateMenuDto input)
        {
            return base.CreateAsync(input);
        }

        public override Task<MenuDto> UpdateAsync(Guid id, CreateUpdateMenuDto input)
        {
            return base.UpdateAsync(id, input);
        }

        public override Task DeleteAsync(Guid id)
        {
            return base.DeleteAsync(id);
        }

        public override Task<MenuDto> GetAsync(Guid id)
        {
            return base.GetAsync(id);
        }

        public override Task<PagedResultDto<MenuDto>> GetListAsync(PagedAndSortedResultRequestDto input)
        {
            return base.GetListAsync(input);
        }
    }
}